#include <iostream>
#include "EpollServer.hpp"

using namespace protocol_ns;
using namespace std;

Response Calculate(const Request &req)
{
    Response resp;

    std::string res = "hello world";

    resp.setBody("hello world");
    resp.addHeader("Content-Length",std::to_string(res.size()));
    resp.setContentType("text/html; charset=UTF-8");

    return resp;
}



int main()
{   
    EpollServer svr(Calculate);

    svr.initServer();
    svr.DisPatcher();
    
    return 0;
}